<ui:composition template="/jsf/defaultDesktopTemplate.xhtml"
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

    <ui:define name="title">
        ${configuration.title}
    </ui:define>
    
	<ui:define name="content">
		<h1>#{menu['main.edit']}</h1>
		
		<h:form id="form">
		
		    <p:growl id="messages" showDetail="true" />
		
		    <p:tree value="#{fileImportBean.root}" var="node" dynamic="true" cache="false"
		            selectionMode="single"  selection="#{fileImportBean.selectedNode}" id="tree">
		
		        <p:ajax event="expand" update=":form:messages" listener="#{fileImportBean.onNodeExpand}" />
		        <p:ajax event="collapse" update=":form:messages" listener="#{fileImportBean.onNodeCollapse}" />
		        <p:ajax event="select" update=":form:messages" listener="#{fileImportBean.onNodeSelect}" />
		        <p:ajax event="unselect" update=":form:messages" listener="#{fileImportBean.onNodeUnselect}" />
		
		        <p:treeNode>
		            <h:outputText value="#{node}" />
		        </p:treeNode>
		    </p:tree>
		
		</h:form>
		
		<p:media value="/resources/other/guide.pdf" width="100%" height="200px">  
    		Your browser can't display pdf, <h:outputLink value="/resources/other/guide.pdf">click</h:outputLink> to download pdf instead.  
		</p:media>
	</ui:define>

</ui:composition>